package com.edu.bean;

import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.context.annotation.Bean;

import java.io.Serializable;

/*
 * @Author:mx
 * @Date:2025/11/4-15:05:03
 */
public class User implements BeanPostProcessor {

    public int userId;

    private String username;

    private String password ;

    private int userAge;

    private Car car ;

    public Car getCar() {
        return car;
    }

    public void setCar(Car car) {
        this.car = car;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getUserAge() {
        return userAge;
    }

    public void setUserAge(int userAge) {
        this.userAge = userAge;
    }

    public User(int userId, String username, String password, int userAge) {
        this.userId = userId;
        this.username = username;
        this.password = password;
        this.userAge = userAge;
    }


    private User(int userId) {
        this.userId = userId;
    }

    public User() {
    }

    @Override
    public String toString() {
        return "User{" +
                "userId=" + userId +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                '}';
    }

    private void sayPrivate(){
        System.out.println("说些什么");
    }

    public void sayHi(){
        sayPrivate();
        System.out.println("hello world");
    }

    public void sayHi(String str){
        System.out.println("你好,"+str);
    }

    public void sayHi(String str,int times){
        for(int i = 0;i<times;i++){
            System.out.println(str);
        }
    }
}
